$OpenBSD: patch-mk_OpenBSD,v 1.2 2006/05/03 07:17:44 aanriot Exp $
--- mk/OpenBSD.orig	Sun Apr 30 18:21:59 2006
+++ mk/OpenBSD	Sun Apr 30 18:29:11 2006
@@ -7,18 +7,15 @@
 # (C) Copyright 2000-2006 by Michal Zalewski <lcamtuf@coredump.cx>
 #
 
-CC      = gcc
+CC      = $(CC) 
 LIBS	= -lpcap
 STRIP   = strip
-CFLAGS  = -O3 -Wall -fomit-frame-pointer -funroll-loops \
-          -DUSE_BPF=\"${USE_BPF}\" \
-	  -I/usr/include/pcap -I/usr/local/include/pcap -I/usr/local/include
+CFLAGS  +=
 FILE	= p0f
-TOOLS   = test/sendack test/sendack2 test/sendsyn
+DATAS   = p0f.fp p0fa.fp p0fr.fp p0fo.fp README
+TOOLS   = test/sendack.c test/sendack2.c test/sendsyn.c
 
-all: $(FILE) strip	
-	@echo ">> You can also try 'make p0fq' to compile a sample query"
-	@echo ">> client (see README for more information)."
+all: $(FILE)
 
 static: $(FILE)-static
 
@@ -45,9 +42,10 @@ publish: clean
 	rm -f /tmp/p0f.tgz
 	
 install: $(FILE)
-	cp -f $(FILE) /usr/sbin/
-	cp -f p0frep /usr/sbin/
-	mkdir /etc/p0f || true
-	cp -f p0f.fp p0fa.fp p0fr.fp p0fo.fp /etc/p0f/
-	cp -f p0f.1 /usr/man/man1/ || cp -f p0f.1 /usr/local/man/man1/
-	@echo "You might want to manually install test/ tools now."
+	$(BSD_INSTALL_PROGRAM) $(FILE) $(PREFIX)/sbin/
+	$(BSD_INSTALL_PROGRAM) p0frep $(PREFIX)/sbin/
+	$(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/doc/p0f
+	$(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/examples/p0f
+	$(BSD_INSTALL_DATA) $(DATAS) $(PREFIX)/share/doc/p0f
+	$(BSD_INSTALL_DATA) $(TOOLS) $(PREFIX)/share/examples/p0f
+	$(BSD_INSTALL_MAN) p0f.1 $(PREFIX)/man/man1
